//
//  MyCollectionViewCell.m
//  CollectionView
//
//  Created by qianfeng001 on 16/3/26.
//  Copyright © 2016年 盛宣伟. All rights reserved.
//

#import "MyCollectionViewCell.h"

@implementation MyCollectionViewCell


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        _topImage  = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width / 2 - 15, 100)];
        _topImage.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_topImage];
        
        _botlabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_topImage.frame)+ 2, [[UIScreen mainScreen] bounds].size.width / 2 - 15, 30)];
        _botlabel.textAlignment = NSTextAlignmentCenter;
        _botlabel.textColor = [UIColor blueColor];
        _botlabel.font = [UIFont systemFontOfSize:13];
        _botlabel.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_botlabel];
        
        _dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_botlabel.frame)+ 2, 60, 20)];
        _dateLabel.font = [UIFont systemFontOfSize:10];
        _dateLabel.backgroundColor = [UIColor brownColor];
        [self.contentView addSubview:_dateLabel];
        
        _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(100, CGRectGetMaxY(_botlabel.frame)+ 2, [[UIScreen mainScreen] bounds].size.width / 2 - 15 -100, 20)];
        _timeLabel.font = [UIFont systemFontOfSize:10];
        _timeLabel.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_timeLabel];
        
    }
    
    return self;
}


@end
